/*
 * (C) 2014-2015 Alibaba Group Holding Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *
 *     __  ___   ______        ___       __          ___
 *    |  |/  /  /  __  \      /   \     |  |        /   \
 *    |  '  /  |  |  |  |    /  ^  \    |  |       /  ^  \
 *    |    <   |  |  |  |   /  /_\  \   |  |      /  /_\  \
 *    |  .  \  |  `--'  |  /  _____  \  |  `----./  _____  \
 *    |__|\__\  \______/  /__/     \__\ |_______/__/     \__\
 *
 *
 *
 */
//
// Created by KOALA TEAM on 12/19/14.
//

#import <UIKit/UIKit.h>

@interface UIImage (KLCrop)

+ (CGRect) calcCropRectInImage:(CGSize)imageSize gravity:(NSString*)gravity viewFrame:(CGRect)viewFrame cropRect:(CGRect)cropRect;
- (UIImage*) cropImageWithGravity:(NSString *)gravity  viewRect:(CGRect)bounds  cropRect:(CGRect)cropRect gray:(BOOL) isGraySpace;
- (UIImage*) cropImageWithGravity:(NSString *)gravity  viewRect:(CGRect)bounds  cropRect:(CGRect)cropRect toSize:(CGSize)size gray:(BOOL) isGraySpace;
-(UIImage*) scaleToSize:(CGSize)size;
@end
